<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>分类</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.10/semantic.min.css">
    <link rel="stylesheet" href="/css/my01.css" >
</head>
<body>
 <!--导航条-->
 <nav class="ui segment inverted attached m-padded-mini m-shadow-small">
 <div class="ui container">
     <div class="ui inverted menu secondary stackable">
         <h2 class="ui teal header item">logo</h2>
         <a th:href="@{/}" class="m-item item m-mobile-hide"><i class="home icon"></i>首页</a>
         <a th:href="@{/types/-1}" class="m-item item m-mobile-hide"><i class="idea icon"></i>分类</a>
         <a th:href="@{/tags/-1}" class="m-item item m-mobile-hide" ><i class="tags icon"></i>标签</a>
         <a th:href="@{/archives}" class="m-item item m-mobile-hide" ><i class="clone icon"></i>归档</a>
         <a  th:href="@{/about}" class="m-item item m-mobile-hide"><i class="info icon"></i>关于我</a>
         <div class="right m-item item m-mobile-hide">
         <div class="ui icon inverted transparent input m-margin-tb-tiny">
             <!--全局搜索-->
             <form name="search" action="#" th:action="@{/search}" method="post" target="_blank">
                 <div class="ui icon inverted transparent input m-margin-tb-tiny">
                     <input type="text" name="query" placeholder="Search...." th:value="${query}">
                     <i onclick="document.forms['search'].submit()" class="search link icon"></i>
                 </div>
             </form>
         </div>
         </div>
     </div>
 </div>
     <a href="" class="black t_menu icon ui button m-mobile-show m-right-top ">
         <i class="sidebar icon"></i>
     </a>
 </nav>
 <!--中间部分-->
 <div class="m-container m-padded-tb-large">
     <div class="ui container">
         <!--header-->
         <div class="ui grid">
                 <!--header-->
                 <div class="ui top attached segment">
                     <div class="ui middle aligned two column grid">
                         <div class="column">
                             <h3 class="ui teal header">分类</h3>
                         </div>
                         <div class="right aligned column">
                             共 <h2 class="ui orange header m-inline-block" th:text="${#arrays.length(types)}">14</h2>篇
                         </div>
                     </div>
                 </div>
                 <!--分类-->
                 <div class="ui attached segment">
                     <div class="ui labeled button m-margin-tb-tiny" th:each="type : ${types}">
                         <a href="#" th:href="@{/types/{id}(id=${type.id})}" class="ui basic  button" th:classappend="${type.id==activeTypeId} ? 'teal'" th:text="${type.name}">思考与感悟</a>
                         <div class="ui basic  left pointing label" th:classappend="${type.id==activeTypeId} ? 'teal'" th:text="${#arrays.length(type.blogs)}">24</div>
                     </div>
                 </div>
                  <!--content-->
             <div class="ui attached segment">

                 <div class="ui vertical segment" th:each="blog:${page.content}">
                     <div class="ui stackable grid mobile reversed">
                         <div class="eleven wide column">
                             <h3 class="header" ><a href="#" th:href="@{/blog/{id}(id=${blog.id})}" th:text="${blog.title}" >你真的理解什么是财富自由吗？</a></h3>
                             <p class="m-text" th:text="|${blog.description}......|">正确做好任何一件事的前提是清晰，正确的理解目标，
                                 而事实上我们很多人对于目标没有明确的定义，甚至根本就没有目标</p>
                             <div class="ui grid">
                                 <div class="eleven wide column">
                                     <div class="ui horizontal link list">
                                         <div class="item">
                                             <img src="../static/images/img01.jpg" alt="" class="ui avatar image"  th:src="@{${blog.user.avatar}}">
                                             <div class="content"><a href="#" class="header" th:text="${blog.user.nickname}" >xxxx</a></div>
                                         </div>
                                         <div class="item">
                                             <i class="calendar icon"></i>
                                             <span th:text="${#dates.format(blog.updateTime,'yyyy-MM-dd')}">2017-10-01</span>
                                         </div>
                                         <div class="item">
                                             <i class="eye icon"></i>
                                             <span th:text="${blog.views}">2342</span>
                                         </div>
                                     </div>

                                 </div>
                                 <div class="five wide column">
                                     <a  th:href="@{/blog/{id}(id=${blog.id})}" class="ui bottom label teal basic" th:text="${blog.type.name}">
                                         认知升级
                                     </a>

                                 </div>
                             </div>
                         </div>
                         <div class="five wide column">
                             <a href="" class="_blank">
                                 <img src="../static/images/wechat.jpg" alt="" class="ui rounded image" th:src="@{${blog.firstPicture}}" style="height: 200px">
                             </a>

                         </div>
                     </div>
                 </div>
             </div>
             <div class="ui bottom attached segment" th:if="${page.totalPages>1}">
                 <div class="ui middle aligned two column grid">
                     <div class="column">
                         <a href="" class=" ui mini teal basic button" th:href="@{/(page=${page.number}-1)}"  th:unless="${page.first}">上一页</a>
                     </div>
                     <div class="right aligned column">
                         <a href="" class=" ui mini teal basic button" th:href="@{/(page=${page.number}+1)}"  th:unless="${page.first}">下一页</a>
                     </div>
                 </div>
             </div>
         </div>

     </div>
 </div>

<!--页脚-->
 <footer class="ui inverted vertical segment">
     <div class="ui center aligned container">
         <div class="ui inverted divided stackable grid">
             <div class="three wide column">
                 <div class="ui link list inverted">
                     <div class="item">
                         <img src="images/wechat.jpg" alt="" class="ui rounded image" style="width: 100px">
                     </div>
                 </div>
             </div>

             <div class="three wide column">
                 <h4 class="ui inverted header">最新博客</h4>
                 <div class="ui inverted link list" th:each="b:${page}">
                     <a href="#" class="item" th:text="${b.title}">用户故事(User Story)</a>
                 </div>
             </div>
             <div class="three wide column">
                 <h4 class="ui inverted header">联系我</h4>
                 <div class="ui inverted link list">
                     <a href="#" class="item">zypzw@163.cn</a>
                     <a href="#" class="item">QQ:1965199277</a>


                 </div>
             </div>
             <div class="seven wide column">
                 <h4 class="ui inverted header">
                     关于我
                 </h4>
                 <p>my name is zhangyuping,this is my personal blog</p>
             </div>
         </div>
         <div class="ui inverted section divider"></div>
         <p class="m-text-thin m-text-spaced m-opacity-mini">Copyright © 2019-9-27</p>
     </div>
 </footer>
</body>
   <script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
   <script src="https://cdn.jsdelivr.net/semantic-ui/2.2.10/semantic.min.js"></script>
<script type="text/javascript">
    $(".t_menu").click(function () {
        $(".m-item").toggleClass("m-mobile-hide");
    })
</script>
</html>